package com.weaver.openapi.service;

import com.weaver.openapi.pojo.position.*;
import com.weaver.openapi.util.*;
import java.util.*;
import cn.hutool.http.*;
import com.alibaba.fastjson.*;

public class PositionService
{
    public static PositionList listPositionV2( String accessToken,  Long posnid, String host,  Map<String, String> headers) {
        host = HostUtil.beforeRequestCheckHeaders(host, headers, "application/json");
        Map<String, Object> paramMap = new HashMap<String, Object>(2);
        paramMap.put("access_token", accessToken);
        paramMap.put("posnid", posnid);
        String resJson = ((HttpRequest)HttpRequest.get(host + "/position/v2/list").form((Map)paramMap).headerMap((Map)headers, true)).execute().body();
        return (PositionList)JSONObject.parseObject(resJson, (Class)PositionList.class);
    }
}
